package com.bajiao.service.appVersion.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bajiao.common.util.FastJsonHelper;
import com.bajiao.entity.app.Version;
import com.bajiao.mapper.app.VersionMapper;
import com.bajiao.service.appVersion.VersionService;
import com.bajiao.vo.app.VersionVO;
import org.springframework.stereotype.Service;

/**
 * @Description: app版本更新记录表
 * @Author: FanJq
 * @Date: 2024-10-10-12-17
 * @Version: V1.0
 */
@Service
public class VersionServiceImpl extends ServiceImpl<VersionMapper, Version> implements VersionService {

    @Override
    public VersionVO queryLastVersion(Integer type) {
        Version version = baseMapper.queryLastVersion(type);
        if (version != null) {
            return FastJsonHelper.beanToBean(version, VersionVO.class);
        }
        return null;
    }
}
